# Maintainer: justforlxz <justforlxz@gmail.com>
pkgname=deepin-session-shell-git
pkgver=5.5.9.r123.gd52f772
pkgrel=1
pkgdesc='Deepin desktop-environment - session-shell module'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/dde-session-shell"
license=('GPL3')
depends=('deepin-daemon-git' 'deepin-wallpapers-git' 'gsettings-qt' 'liblightdm-qt5' 'startdde-git' 'kwayland' 'qt5-wayland')
makedepends=('git' 'cmake' 'ninja' 'qt5-tools' 'gtest' 'gmock' 'dtkcommon-git' 'dtkcore-git' 'dtkwidget-git')
conflicts=('deepin-session-ui<5' 'deepin-session-shell')
provides=('lightdm-deepin-greeter' 'deepin-session-shell')
groups=('deepin-git')
source=('source.tar.gz')
sha512sums=('SKIP')

prepare() {
    cd $deepin_source_name

  sed -i 's/5\.5//g' CMakeLists.txt tests/lightdm-deepin-greeter/CMakeLists.txt tests/dde-lock/CMakeLists.txt
}

build() {
  cd $deepin_source_name
  cmake . -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc
  ninja
}

package() {
  cd $deepin_source_name
  DESTDIR="$pkgdir" ninja install
  chmod +x "$pkgdir"/usr/bin/deepin-greeter
}
